convert string to bytes object in python